home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / lang / c++-part1 / 8376 < prev    next >
Encoding:
Internet Message Format  |  1996-08-05  |  1.4 KB

  1. Path: news2.EUnet.fr!enst!orfanos
  2. From: orfanos@ima.enst.fr
  3. Newsgroups: comp.lang.c++
  4. Subject: Re: Am I imagining auto_ptr?
  5. Date: 17 Feb 1996 11:17:42 GMT
  6. Organization: ENST - France
  7. Sender: orfanos@news.enst.fr (Dimitri Papadopoulos Orfanos)
  8. Distribution: world
  9. Message-ID: <4g4dgm$m65@enst.enst.fr>
  10. References: <3124A4D5.FF@novell.com> <3125187C.E1B@novell.com>
  11. NNTP-Posting-Host: mathieu-2.enst.fr
  12. Mime-Version: 1.0
  13. Content-Type: text/plain; charset=iso-8859-1
  14. Content-Transfer-Encoding: 8bit
  15.  
  16.  
  17. In article <3125187C.E1B@novell.com>,
  18. Jeff Robison <jeffr@novell.com> writes:
  19. > It seems like I recently read or heard or dreamed about a new
  20. > keyword/type/whatever in the C++ draft standard called an auto_ptr.
  21. > I believe it will automatically delete its contents when it goes
  22. > out of scope.  Something like this would be incredibly useful when
  23. > handling (or rather not having to handle) exceptions.
  24. > Am I imagining things, or does such a beast exist?  If it does exist,
  25. > can you point me to some syntax/usage documentation?
  26.  
  27. You can find an implementation of auto_ptr in Scott Meyers'
  28. "More Effective C++: 35 New Ways to Improve Your Programs and
  29. Designs", Addison-Wesley, 1996, ISBN 0-201-63371-X
  30.  
  31. 'auto_ptr' is already in the draft standard. It is not yet
  32. implemented in most compilers. It is very useful indeed
  33. with exceptions.
  34.  
  35. The above implementation can be downloaded from:
  36.     http://aw.com/cp/mec++-appendix.html
  37.  
  38. --
  39. Dimitri Papadopoulos
  40. orfanos@ima.enst.fr
  41.